/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lab2task1;

import java.lang.Object;
import java.lang.reflect.Array;
import java.util.Scanner;

/**
 *
 * @author zhuyuehan
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        Main m = new Main();
        m.add();

    }

    public void add() {
        int[] arr = new int[10];

        int[] temp = new int[20];

        for (int c = 0; c < 20; c++) {
            if (c < arr.length) {
                arr[c] = c;
            } else {
               
                for(int i = 0; i < arr.length; i++) {
                    temp[i] = arr[i];
                }
                arr=temp;
            }

            for (int i = 0; i < arr.length; i++) {

                System.out.println(arr[i]);

             }
        }
    }
}
